# 爬虫中间件

class SpiderMiddlewareOne(object):
    # 1.传递 request
    def process_request(self, request):
        print('爬虫One--中间件--request')
        return request

    # 2.传递response
    def process_response(self, response):
        print("爬虫--中间件One--response")
        return response

class SpiderMiddlewareTwo(object):
    # 1.传递 request
    def process_request(self, request):
        print('爬虫Two--中间件--request')
        return request

    # 2.传递response
    def process_response(self, response):
        print("爬虫Two--中间件--response")
        return response